#include "Bellman_Ford.hpp"
#include <ctime>

#define N_VERTEX 729

void run(){
    time_t time = 0;
    vector<vector<int>> weight;
    for (size_t i = 0; i < N_VERTEX; i++)
    {
        vector<int> row;
        for (size_t j = 0; j < N_VERTEX; j++)
        {
            int a;
            scanf("%d,", &a);
            row.push_back(a);
        }
        weight.push_back(row);
    }

    for (size_t i = 0; i < 1000; i++)
    {
        time_t begin, end;
        auto G = Weight_Directed_Graph(weight);
        auto BF = Bellman_Ford();
        begin = clock();
        BF.run_Bellman_Ford(&G, 0, &weight);
        end = clock();
        if (i == 999)
        {
            BF.output_result(&G, 0);
        }
        time += end - begin;
    }

    cout << "time=" << time << endl;
}

int main(){
    run();
}